A mobile device such as a cellular phone or a smart phone, PDA, handheld computer, navigational device, gaming device, netbook, among others can be equipped with a magnetometer. Magnetometer readings can be used to provide its user with a direction, which may be a “heading” (typically given relative to the Earth's true North), and/or an arrow pointing to true North. The direction information may be provided for the user's own navigation knowledge, for example, to tell the user which way is north while the user is walking or driving in unfamiliar surroundings. The direction information can also be used by a navigation or map application that may be running on the mobile device.
The magnetometer obtains a measure of the magnetic field that is present in the immediate surroundings of the mobile device as a two or three-component vector in a Cartesian coordinate system using 2-axis or 3-axis magnetic sensors. The sensed magnetic field can contain a contribution of the Earth's magnetic field and a contribution by a local interference field (interference field co-located with the mobile device). The latter is a magnetic field that is created by field sources in the local environment of the mobile device. This may include contributions made by one or more magnetic components that are near the magnetic sensors, such as the magnet of a loudspeaker that is built into the mobile device. The interference field may also have a contribution due to one or more magnetic objects found in the external environment close to the device, such as when the user is driving an automobile, riding in a train or bus, or riding on a bicycle or motorcycle. In most cases, the interference field is not negligible relative to the Earth's magnetic field. Therefore, a calibration procedure is needed to reduce the adverse impact of the interference field contribution from the sensors' measurements to allow the magnetometer to calculate a more accurate direction.
There are several types of 3-axis calibration procedures. In one such technique, the user is instructed to rotate the mobile device (containing the magnetometer) according to a set of geometrically different orientations and azimuth angles, while measurements by the magnetometer and by an orientation sensor are collected and analyzed to isolate or quantify the interference field. The quantified interference field can then be subtracted from the measurement taken by the magnetic sensor to yield the Earth's geomagnetic field. The Earth's geomagnetic field can be further corrected to get the true north direction, such as correcting for magnetic variation (declination) due to the variation of the Earth's magnetic field based on geographic location.
In another 3-axis calibration technique, rather than instruct the user to deliberately rotate the mobile device in a predetermined manner, measurements are collected from the magnetometer, continuously over a period of time, while the mobile device is being used or carried by the user. This can lead to random (albeit sufficient) rotations of the mobile device, such that the magnetometer measurements define a desired, generally spherical measurement space. The sphere is offset from the origin of a coordinate system for the Earth's geomagnetic field vector by an unknown offset vector, which can represent a substantial part (if not all) of the interference field. Mathematical processing of the measurements can be performed to “re-center” the sphere by determining the offset vector. This technique is transparent to the user because the user is not required to go through a calibration procedure where the user deliberately rotates the device through a specified set of orientations.